package round89;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class B {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(in.readLine());
        for (int i = 0; i <= N; i++) {
            int j;
            for (j = 0; j < 2 * (N - i); j++) {
                System.out.print(" ");
            }
            for (j = 0; j <= i; j++) {
                System.out.printf("%d" + (i>0 ? " " : ""), j);
            }
            j = i - 1;
            for (; j >= 0; j--) {
                System.out.printf("%d" + (j > 0 ? " " : ""), j);
            }
            System.out.println();
        }

        for (int i = N - 1; i >= 0; i--) {
            int j;
            for (j = 0; j < 2*(N - i); j++) {
                System.out.print(" ");
            }
            for (j = 0; j <= i; j++) {
                System.out.printf("%d"+ (i>0 ? " " : ""), j);
            }
            j = i - 1;
            for (; j >= 0; j--) {
                System.out.printf("%d"+ (j > 0 ? " " : ""), j);
            }
            System.out.println();
        }
    }
}
